package node;

import java.util.Objects;

public  class Node{
    private int i;
    private int j;
    public Node (){
    }
    public Node (int i, int j) {
        super () ;
        this. i=i;
        this.j = j;
    }

    public String toString() {
        return "Node{" +
                "i=" + i +
                ", j=" + j +
                '}';
    }

    public boolean equals (Object obj){
        if (obj==null) {
            return false;
        }
        if (this==obj){
            return true;
        }
        if (obj instanceof Node) {
            Node n = (Node) obj;
            return this.i==n.i&&this.j==n.j;
        }
        return false;
    }

    public int hashCode() {
        return Objects.hash(i, j);
    }

    public void setI(int i){
        this.i=i;
    }
    public int getI(){
        return  i;
    }
    public int getJ() {
        return j;
    }
    public void setJ(int j){
        this.j= j;
    }
}
